<?php
$string1 = "TATAGTTTCCTCTCTATAT";
$string2 = "AAAGCCTCAAATCTCTCTAGTAAAAAAGCCTCAAATCTCTCTAGTAAA
AAAGCCTCAAATCTCTCTAGTAAAAAAGCCTCAAATCTCTCTAGTAAA AAAGCCTCAAATCTCTCTAGTAAAAAAGCCTCAAATCTCTCTAGTAAA
 AAAGCCTCAAATCTCTCTAGTAAAAAAGCCTCAAATCTCTCTAGTAAA AAAGCCTCAAATCTCTCTAGTAAAAAAGCCTCAAATCTCTCTAGTAAA
 AAAGCCTCAAATCTCTCTAGTAAAAAAGCCTCAAATCTCTCTAGTAAA";
$completeString = preg_replace('/[ \n\r]/', '', $string1 . $string2);
$searchFor = "AAAAAA";

for ($i = 0; $i < strlen($completeString); $i++) {
	If (substr($completeString, $i, strlen($searchFor)) == $searchFor) {
		echo "$i<BR>";
	}
}
echo "<BR>Merk op dat overlappende strings worden meegeteld, <BR>
	hoewel deze in dit geval niet voorkomen in de string.";
?>